package com.chen.pojo;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chen.pojo.bean.UserInfo;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @author chenchao
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
@ApiModel(value = "用户",description = "")
@SuppressWarnings("all")
public class User implements Serializable {

    //主键id
    @TableId(type = IdType.AUTO)
    private Integer id;

    //用户名
    private String username;

    //密码
    private String password;

    //性别
    private String sex;

    //年龄
    private int age;

    //个人介绍
    private String introduce;

    //头像
    private String avatar;

    //昵称
    private String nick;

    //地址
    private String address;

    //注册时间
    private String regtime;

    //验证码
    @TableField(exist = false)
    private String code;

    @TableField(exist = false)
    private String token;

    //角色
    private int role;

    @TableField(exist = false)
    private int userSexCount;

    //是否启动
    @TableField(exist = false)
    private Boolean enable;

    //积分
    private int points;


    //QQ
    @TableField("open_id")
    private String openId;



    @TableField(exist = false)
    private Set<Permission> permissions;

    @TableField(exist = false)
    private List<Integer> roles;


    @TableField(exist = false)
    private int userCount;



}
